package com.zhixianggou.caibaobox.user.center;

import com.zhixianggou.caibaobox.commons.result.ReturnData;
import com.zhixianggou.caibaobox.user.service.UserAuthService;
import com.zhixianggou.caibaobox.user.shiro.ShiroUser;
import com.zhixianggou.caibaobox.user.shiro.utils.ShiroUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zyq
 * 9/1/24 2:06 PM
 */
@RestController
@RequestMapping("/user/center")
public class UserInfoController {

    @Resource
    UserAuthService userAuthService;

    @RequestMapping("/getUserInfo")
    public ReturnData getUserInfo(){
        return userAuthService.getUserCenterInfo(ShiroUtil.getCurrentUserId());
    }
}
